home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 February / macformat-047.iso / Demos / Simpsons Cartoon Studio™ Demo / Simpsons / Support / dlogdata / open.Dxr / 00004_main frame.ls < prev    next >
Encoding:
Text File  |  1996-08-16  |  1.1 KB  |  40 lines

  1. on exitFrame
  2.   if rollOver(20) then
  3.     set the loc of sprite 48 to point(22, 30)
  4.   else
  5.     set the loc of sprite 48 to point(-1000, 30)
  6.   end if
  7.   go(the frame)
  8. end
  9.  
  10. on mouseDown
  11.   set whichSprite to the clickOn
  12.   if (whichSprite >= 2) and (whichSprite <= 5) then
  13.     handleButton(theOpenDialog, whichSprite)
  14.   else
  15.     if (whichSprite = 10) or (whichSprite = 11) then
  16.       handleButton(theScrollBar, whichSprite)
  17.     else
  18.       if whichSprite = 9 then
  19.         moveThumbRect(theScrollBar, the mouseH)
  20.       else
  21.         if whichSprite = 12 then
  22.           set offset to the width of sprite 13 / 2
  23.           repeat while the mouseDown
  24.             if (the mouseH >= (the left of sprite 9 + offset)) and (the mouseH <= (the right of sprite 9 - offset)) then
  25.               set the locH of sprite 13 to the mouseH
  26.             end if
  27.             updateStage()
  28.           end repeat
  29.           moveThumbRect(theScrollBar, the locH of sprite 13)
  30.           set the locH of sprite 13 to -1000
  31.         else
  32.           if whichSprite = 48 then
  33.             clickedPreview(theOpenDialog)
  34.           end if
  35.         end if
  36.       end if
  37.     end if
  38.   end if
  39. end
  40.